<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Songbook File Format Guide</title>
</head>
<body>
<center><h1>Songbook File Format Guide</h1></center>
<hr/>
<h2><u>Introduction</u></h2>
<p>
Chordshop saves song collections in Songbook files with an ".sbk" extension.  A Songbook
file produces a single PDF which can contain any number of songs and song versions.
These are plain text files.  By default the resulting PDF will have the same name as the Songbook file,
except with a ".pdf" extension.
</p>
<hr/>
<h2><u>Example File</u></h2>
<p>
An example is worth a thousand words, so here we go:
</p>
<table border="0" bgcolor="#e8e8e8" width="100%" cellpadding="10"><tr><td><pre>
!index = 1
!instrument = Mandolin
!chords_face = Helvetica
!chords_size = 10
amazing_grace_easy_version.pro
Amazing Grace - Correct.pro+
# comment, ignore me
Amazing Grace.pro+|transpose=D
Amazing Grace.pro+|capo=2,3,5
Amazing Grace.pro|chords_size=14|lyrics_size=14
</pre></td></tr></table>
<p>
The stucture is pretty simple.  Here are a few important points to note:
</p>
<ol>
<li>
<p>
The file is read from top to bottom.
</p>
</li>
<li>
<p>
Any line <em>starting</em> with a <tt>#</tt> is ignored.
</p>
</li>
<li>
<p>
Any line starting with a <tt>!</tt> is a configuration line.  These variables
  change the behavior of Chordshop.  The <tt>!index = 1</tt> command tells Chordshop
  to create an index after creating all of the song pages.
</p>
</li>
<li>
<p>
All other lines are file names to process.
</p>
</li>
<li>
<p>
If a pipe (|) is after a file name,
  it means that the configuration variables that follow should override any variables in
  that file.  (In effect, this overrides configuration variables <em>everywhere</em> else.) Multiple
  variables are separated with additional pipes.
</p>
</li>
<li>
<p>
A line that starts with "@" is a special "glob" macro.
</p>
<ul>
<li>
<p>
Wildcard characters (* and ?)  found on the line are expanded.
</p>
</li>
<li>
<p>
Examples: "@<strong>.pro+", "@</strong>.<strong>", "@</strong>.pro"
</p>
</li>
<li>
<p>
Expansion is done relative to the directory in which the Songbook file resides.
</p>
<ul>
<li>
<p>
Subdirectories are NOT processed automatically.
</p>
</li>
<li>
<p>
A subdirectory can be processed explicity.  If there was a directory called
          <tt>subdir</tt>, then the command would be: "@subdir/*.pro+"
</p>
</li>
</ul>
</li>
<li>
<p>
No pipe overrides are allowed on these lines.
</p>
</li>
</ul>
</li>
</ol>
<p></p>
<p></p>
<hr/><p><small>
Copyright 2004, Blake T. Garretson, All rights reserved.<br />
Last updated 07-Jul-2004 22:07:06 Eastern Standard Time
</small></p>
</body>
</html>
